<?php
class Default_Model_TableColumn_LienHe {

	protected $id;
	protected $ten_cty;
	protected $dia_chi;
	protected $dien_thoai;
	protected $fax;
	protected $email;

	public function __construct(array $options = null) {
		if (is_array($options)) {
			$this->setOptions($options);
		}
	}
	
	public function __set($name, $value) {
		$method = 'set' . $name;
		if (('mapper' == $name) || !method_exists($this, $method)) {
			throw new Exception('Invalid content property');
		}
		$this->$method($value);
	}
	
	public function __get($name) {
		$method = 'get' . $name;
		if (('mapper' == $name) || !method_exists($this, $method)) {
			throw new Exception('Invalid content property');
		}
		return $this->$method();
	}
	
	public function setOptions(array $options) {
		$methods = get_class_methods($this);
		foreach ($options as $key => $value) {
			$method = 'set' . ucfirst($key);
			if (in_array($method, $methods)) {
				$this->$method($value);
			}
		}
		return $this;
	}
	
	//Id
	public function getId() {
		return $this->id;
	}
	
	public function setId($id) {
		$this->id = $id;
	}
	
	//Tên công ty
	public function getTen_cty() {
		return $this->ten_cty;
	}
	
	public function setTen_cty($value) {
		$this->ten_cty = $value;
	}
	
	//Địa chỉ
	public function getDia_chi() {
		return $this->dia_chi;
	}
	
	public function setDia_chi($value) {
		$this->dia_chi = $value;
	}
	
	//Điện thoại
	public function getDien_thoai() {
		return $this->dien_thoai;
	}
	
	public function setDien_thoai($value) {
		$this->dien_thoai = $value;
	}
	
	//Số fax
	public function getFax() {
		return $this->fax;
	}
	
	public function setFax($value) {
		$this->fax = $value;
	}
	
	//Email
	public function getEmail() {
		return $this->email;
	}
	
	public function setEmail($email) {
		$this->email = $email;
	}
}